package com.ct.boss.demo.exception;

/**
 * @author ChenTong
 * @version 1.0
 * @description 业务异常处理
 * @date 2020/6/15 6:54
 * @modified
 **/
public class BusinessException extends RuntimeException {

    private final int code;

    public BusinessException(int code,Throwable cause) {
        super(cause.getMessage(),cause);
        this.code = code;
    }

    public BusinessException(int code,String msg,Throwable cause) {
        super(msg,cause);
        this.code = code;
    }

    public BusinessException(int code,String msg) {
        super(msg);
        this.code = code;
    }

    public int getCode() {
        return code;
    }
}

